package com.monitor.system.service.impl;

import java.util.List;
import com.monitor.common.utils.DateUtils;
import com.monitor.system.domain.vo.InstrumentPanelVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.monitor.system.mapper.InstrumentPanelMapper;
import com.monitor.system.domain.InstrumentPanel;
import com.monitor.system.service.IInstrumentPanelService;

/**
 * 仪盘Service业务层处理
 * 
 * @author monitor
 * @date 2024-06-06
 */
@Service
public class InstrumentPanelServiceImpl implements IInstrumentPanelService
{
    @Autowired
    private InstrumentPanelMapper instrumentPanelMapper;

    /**
     * 查询仪盘
     * 
     * @param id 仪盘主键
     * @return 仪盘
     */
    @Override
    public InstrumentPanel selectInstrumentPanelById(Long id)
    {
        return instrumentPanelMapper.selectInstrumentPanelById(id);
    }

    /**
     * 查询仪盘列表
     * 
     * @param instrumentPanel 仪盘
     * @return 仪盘
     */
    @Override
    public List<InstrumentPanel> selectInstrumentPanelList(InstrumentPanel instrumentPanel)
    {
        return instrumentPanelMapper.selectInstrumentPanelList(instrumentPanel);
    }

    /**
     * 新增仪盘
     * 
     * @param instrumentPanel 仪盘
     * @return 结果
     */
    @Override
    public int insertInstrumentPanel(InstrumentPanel instrumentPanel)
    {
        instrumentPanel.setCreateTime(DateUtils.getNowDate());
        return instrumentPanelMapper.insertInstrumentPanel(instrumentPanel);
    }

    /**
     * 修改仪盘
     * 
     * @param instrumentPanel 仪盘
     * @return 结果
     */
    @Override
    public int updateInstrumentPanel(InstrumentPanel instrumentPanel)
    {
        instrumentPanel.setUpdateTime(DateUtils.getNowDate());
        return instrumentPanelMapper.updateInstrumentPanel(instrumentPanel);
    }

    /**
     * 批量删除仪盘
     * 
     * @param ids 需要删除的仪盘主键
     * @return 结果
     */
    @Override
    public int deleteInstrumentPanelByIds(Long[] ids)
    {
        return instrumentPanelMapper.deleteInstrumentPanelByIds(ids);
    }

    /**
     * 删除仪盘信息
     * 
     * @param id 仪盘主键
     * @return 结果
     */
    @Override
    public int deleteInstrumentPanelById(Long id)
    {
        return instrumentPanelMapper.deleteInstrumentPanelById(id);
    }
    /**
     * 查询仪盘列表
     *
     * @param instrumentPanelVo 仪盘
     * @return 仪盘
     */
    @Override
    public List<InstrumentPanelVo> selectInstrumentPanelCurrentNormalList(InstrumentPanelVo instrumentPanelVo)
    {
        return instrumentPanelMapper.selectInstrumentPanelCurrentNormalList(instrumentPanelVo);
    }
    /**
     * 查询仪盘列表
     *
     * @param instrumentPanelVo 仪盘
     * @return 仪盘
     */
    @Override
    public List<InstrumentPanelVo> selectInstrumentPanelNormalList(InstrumentPanelVo instrumentPanelVo)
    {
        return instrumentPanelMapper.selectInstrumentPanelNormalList(instrumentPanelVo);
    }
    /**
     * 查询仪盘列表
     *
     * @param instrumentPanelVo 仪盘
     * @return 仪盘
     */
    @Override
    public List<InstrumentPanelVo> selectInstrumentPanelCurrentAbnormalList(InstrumentPanelVo instrumentPanelVo)
    {
        return instrumentPanelMapper.selectInstrumentPanelCurrentAbnormalList(instrumentPanelVo);
    }
    /**
     * 查询仪盘列表
     *
     * @param instrumentPanelVo 仪盘
     * @return 仪盘
     */
    @Override
    public List<InstrumentPanelVo> selectInstrumentPanelAbnormalList(InstrumentPanelVo instrumentPanelVo)
    {
        return instrumentPanelMapper.selectInstrumentPanelAbnormalList(instrumentPanelVo);
    }
}
